#ifndef __DRV_FPGA__HH
#define __DRV_FPGA__HH

typedef struct  
{
    uint8 head;
    uint8 flag;
    uint16 R_Temperature;
    uint16 R_Power;
    uint16 T_Temperature;
    uint16 T_Power;
    uint16 T_Detection;
    uint8 Check;
    uint8 end;
} StatusTRData;


void send_TRX(uint32 * buff, int size);
void send_data(int ch, int addr);

void set_pulse(int addr);

#define Sector1_pulse        set_pulse(10)
#define Sector2_pulse        set_pulse(11)
#define Sector3_pulse        set_pulse(12)
#define Step_pulse           set_pulse(13)

#define Sector_pulse(num)    { if(num == 0) { Sector1_pulse; } \
                               if(num == 1) { Sector2_pulse; } \
                               if(num == 2) { Sector3_pulse; } \
                             }

void send_angle(double val);
void send_model(int val);

#endif // !__DRV_FPGA__HH